package com.origin.oss.solution.ali;

import cn.hutool.core.text.CharPool;
import com.origin.oss.constant.OssConstant;
import com.origin.oss.solution.ali.config.AliOssConfig;
import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author yezh
 * @date 2024/2/21 19:19
 */
@ConfigurationProperties(OssConstant.OSS + CharPool.DOT + OssConstant.OssType.ALI)
@Data
public class AliOssProperties implements InitializingBean {

    private Boolean enable = false;

    private AliOssConfig ossConfig;

    @Override
    public void afterPropertiesSet() throws Exception {
        ossConfig.setBasePath(ossConfig.getBasePath());
    }

}
